﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TIMETABLEASY.TokenAuthentification
{
    class SingletonTokenUser
    {
        //Const of user type
        public static string Admin = "administrators";
        public static string Student = "students";
        public static string Manager = "managers";
        public static string Teacher = "teacher";

        //for all users
        private string user_level;
        public string User_level 
        {
            get { return user_level; }
            set
            {
                if (user_level != value)
                {
                    user_level = value;
                   
                }
            }
        }

        private int user_id;
        public int User_id
        {
            get { return user_id; }
            set
            {
                if (user_id != value)
                {
                    user_id = value;

                }
            }
        }

        private string user_login;
        public string User_login
        {
            get { return user_login; }
            set
            {
                if (user_login != value)
                {
                    user_login = value;

                }
            }
        }

        private string user_fistname;
        public string User_fistname
        {
            get { return user_fistname; }
            set
            {
                if (user_fistname != value)
                {
                    user_fistname = value;

                }
            }
        }

        private string user_surname;
        public string User_surname
        {
            get { return user_surname; }
            set
            {
                if (user_surname != value)
                {
                    user_surname = value;

                }
            }
        }

        //Special for managers / students / teachers
        private string user_campus;
        public string User_campus
        {
            get { return user_campus; }
            set
            {
                if (user_campus != value)
                {
                    user_campus = value;

                }
            }
        }

        //Special for students / teachers
        private string user_classe;
        public string User_classe
        {
            get { return user_classe; }
            set
            {
                if (user_classe != value)
                {
                    user_classe = value;

                }
            }
        }

        //Special for teachers
        private string user_cursus;
        public string User_cursus
        {
            get { return user_cursus; }
            set
            {
                if (user_cursus != value)
                {
                    user_cursus = value;

                }
            }
        }


        private int user_is_student;
        public int User_is_student
        {
            get { return user_is_student; }
            set
            {
                if (user_is_student != value)
                {
                    user_is_student = value;

                }
            }
        }

        //Attributs for filtring the timetable
        private bool is_perso_selected;
        public bool Is_perso_selected
        {
            get { return is_perso_selected; }
            set
            {
                if (is_perso_selected != value)
                {
                    is_perso_selected = value;

                }
            }
        }

        //(University Campus Period Class Person)
        private string typeOfView;
        public string TypeOfView
        {
            get { return typeOfView; }
            set
            {
                if (typeOfView != value)
                {
                    typeOfView = value;

                }
            }
        }

        //id of the Campus/Period/Class/Person or none
        private int valueOfView;
        public int ValueOfView
        {
            get { return valueOfView; }
            set
            {
                if (valueOfView != value)
                {
                    valueOfView = value;

                }
            }
        }

        //for period et user
        private string valueOfView2nd;
        public string ValueOfView2nd
        {
            get { return valueOfView2nd; }
            set
            {
                if (valueOfView2nd != value)
                {
                    valueOfView2nd = value;

                }
            }
        }

        private string type_person;
        public string Type_person
        {
            get { return type_person; }
            set
            {
                if (type_person != value)
                {
                    type_person = value;

                }
            }
        }

        private int notepad_enabled;
        public int Notepad_enabled
        {
            get { return notepad_enabled; }
            set
            {
                if (notepad_enabled != value)
                {
                    notepad_enabled = value;

                }
            }
        }

        private string notepad_text;
        public string Notepad_text
        {
            get { return notepad_text; }
            set
            {
                if (notepad_text != value)
                {
                    notepad_text = value;

                }
            }
        }

        private string database_mode;
        public string Database_mode
        {
            get { return database_mode; }
            set
            {
                if (database_mode != value)
                {
                    database_mode = value;

                }
            }
        }
        

        private static SingletonTokenUser _theUniqueInstance = null;

        private SingletonTokenUser() { }

        public static SingletonTokenUser GetInstance()
        {
            if (_theUniqueInstance == null)
                return _theUniqueInstance = new SingletonTokenUser();
            else
                return _theUniqueInstance;
        } 



    }
}
